home *** CD-ROM | disk | FTP | other *** search
- # TestB.tcl
-
- puts "About to construct an instance of class A"
- set a [otclNew A NULL]
-
- puts "\nAbout to call method doIt on instance of class A"
- $a doIt
-
- source B.tcl
- puts "\nAbout to construct and instance of class B"
- set b [otclNew B NULL 5]
-
- puts "\nAbout to call method doIt on instance of class B"
- $b doIt
-
- puts "\nSetting instance of class A to point at instance of class B"
- $a setNext $b
- puts "About to call method doItNext on instance of class A"
- $a doItNext
-
- puts "\nAbout to destruct instance of class A"
- otclDelete $a
-
- puts "\nAbout to destruct instance of class B"
- otclDelete $b
-